package cn.swenty.backstage.framework.database.mybatis.enums;

public enum CRUD {
	//保存
	SAVE("$save"),
	
	//修改
	UPDATE("$update"),
	
	//修改全部
	UPDATE_FULL("$updateFull"),
	
	//删除
	DELETE("$delete"),
	
	//查询
	QUERY("$query"),
	
	//按照id加载
	QUERY_ONE("$queryOne");
	
	
	private String code;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	// 获取status
	public static CRUD get(String code) {
		for (CRUD c : CRUD.values()) {
			if (c.getCode().equals(code)) {
				return c;
			}
		}
		return null;
	}
	private CRUD(String code){
		this.code = code;
	}

}
